
import Vue from "vue"
import VueRouter from 'vue-router'

import Hello from '../components/Hello'
import Main from '../components/Main'

//安装路由
Vue.use(VueRouter);

//配置导出路由
export default new VueRouter({
  routes: [
    {
      //路由路径
      path: '/hello',
      //路由名
      name: 'hello',
      //要显示的组件
      component: Hello
    },
    {
      //路由路径
      path: '/main',
      name: 'main',
      component: Main
    }
  ]
})
